<!--
 * @Description: 浏览器对象模型BOM
 * @Author: zzj
 * @Date: 2021-09-15 09:49:20
 * @LastEditors: zzj
 * @LastEditTime: 2021-09-15 10:18:40
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浏览器对象模型BOM</title>
    <script>
        if(window.screenLeft)
            console.log(window.screenLeft+","+window.screenTop+"$1")
        else
        console.log(window.screenX+","+screenY+"$2")

    console.log(window.pageXOffset);  //谷歌
    console.log(window.pageYOffset);  //谷歌
    console.log(document.documentElement.scrollTop); //firefox
    console.log(document.documentElement.scrollLeft); //firefox
    console.log(window.innerHeight);
    console.log(window.innerWidth);
    console.log(window.outerHeight);
    console.log(window.outerHeight); //IE8以下不支持

    //打开窗口
    var w = window.open("http://www.baidu.com","_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400");
    
    </script>
</head>
<body>
    <div style="height: 200px;"></div>
</body>
</html>